package com.example.logistics.repository;

import com.example.logistics.entity.CustomerOrder;
import com.example.logistics.entity.OrderStatus;
import com.example.logistics.entity.Warehouse;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;
import java.util.Optional;

public interface CustomerOrderRepository extends JpaRepository<CustomerOrder, Long> {
    Optional<CustomerOrder> findByOrderNumber(String orderNumber);
    List<CustomerOrder> findByStatus(OrderStatus status);
    List<CustomerOrder> findByWarehouse(Warehouse warehouse);
}


